awk -F ' ' '{if($1==8 && $4 >=130381734 && $4 <= 130698818)print $0}' UCSF_Tom_Hugues.tped > UCSF_Tom_Hugues_impute.tped
awk -F ' ' '{if($1==9 && $4 >=21961000 && $4 <= 22126000)print $0}' UCSF_Tom_Hugues.tped >> UCSF_Tom_Hugues_impute.tped
awk -F ' ' '{if($1==20 && $4 >=62270556 && $4 <= 62387556)print $0}' UCSF_Tom_Hugues.tped >> UCSF_Tom_Hugues_impute.tped
plink --tfile UCSF_Tom_Hugues_impute --make-bed --out UCSF_Tom_Hugues_impute
 awk '{if(($5=="A" && $6=="T") || ($5=="T" && $6=="A") || ($5=="G" && $6=="C") || ($5=="C" && $6=="G"))print $2."\t"2}' UCSF_Tom_Hugues_impute.bim  >fwd_ind
gzip UCSF_Tom_Hugues_impute.tped
